package com.hlf.modules.api.mapper;

import com.hlf.modules.api.entity.TokenEntity;
import com.hlf.modules.base.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 用户Token
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2017-03-23 15:22:07
 */
@Mapper
public interface TokenMapper extends BaseMapper<TokenEntity> {
    
    TokenEntity queryByUserId(Long userId);

    TokenEntity queryByToken(String token);

    int deleteForId(@Param("userId") long userId);

}
